+++Contents
+++Int 21
These are the DOS Functions.

%TInt 21 00%T -- DOS - PROGRAM TERMINATION
%TInt 21 01%T -- DOS - KEYBOARD INPUT
%TInt 21 02%T -- DOS - DISPLAY OUTPUT
%TInt 21 03%T -- DOS - AUX INPUT
%TInt 21 04%T -- DOS - AUX OUTPUT
%TInt 21 05%T -- DOS - PRINTER OUTPUT
%TInt 21 06%T -- DOS - DIRECT CONSOLE I/O CHARACTER OUTPUT
%TInt 21 06%T -- DOS - DIRECT CONSOLE I/O CHARACTER INPUT
%TInt 21 07%T -- DOS - DIRECT STDIN INPUT, NO ECHO
%TInt 21 08%T -- DOS - KEYBOARD INPUT, NO ECHO
%TInt 21 09%T -- DOS - PRINT STRING
%TInt 21 0A%T -- DOS - BUFFERED KEYBOARD INPUT
%TInt 21 0B%T -- DOS - CHECK STANDARD INPUT STATUS
%TInt 21 0C%T -- DOS - CLEAR KEYBOARD BUFFER
%TInt 21 0D%T -- DOS - DISK RESET
%TInt 21 0E%T -- DOS - SELECT DISK
%TInt 21 0F%T -- DOS - OPEN DISK FILE
%TInt 21 10%T -- DOS - CLOSE DISK FILE
%TInt 21 11%T -- DOS - SEARCH FIRST USING FCB
%TInt 21 12%T -- DOS - SEARCH NEXT USING FCB
%TInt 21 13%T -- DOS - DELETE FILE via FCB
%TInt 21 14%T -- DOS - SEQUENTIAL DISK FILE READ
%TInt 21 15%T -- DOS - SEQUENTIAL DISK RECORD WRITE
%TInt 21 16%T -- DOS - CREATE A DISK FILE
%TInt 21 17%T -- DOS - RENAME FILE via FCB
%TInt 21 18%T -- DOS Internal - UNUSED
%TInt 21 19%T -- DOS - GET DEFAULT DISK NUMBER
%TInt 21 1A%T -- DOS - SET DISK TRANSFER AREA ADDRESS
%TInt 21 1B%T -- DOS - ALLOCATION TABLE INFORMATION
%TInt 21 1C%T -- DOS - ALLOCATION TABLE INFORMATION FOR SPECIFIC DEVICE
%TInt 21 1D%T -- DOS Internal - UNUSED
%TInt 21 1E%T -- DOS Internal - UNUSED
%TInt 21 1F%T -- DOS Internal - GET DEFAULT DRIVE PARAMETER BLOCK
%TInt 21 20%T -- DOS Internal - UNUSED
%TInt 21 21%T -- DOS - RANDOM DISK RECORD READ
%TInt 21 22%T -- DOS - RANDOM DISK RECORD WRITE
%TInt 21 23%T -- DOS - GET FILE SIZE
%TInt 21 24%T -- DOS - SET RANDOM RECORD FIELD
%TInt 21 25%T -- DOS - SET INTERRUPT VECTOR
%TInt 21 26%T -- DOS - CREATE PSP
%TInt 21 27%T -- DOS - RANDOM BLOCK READ
%TInt 21 28%T -- DOS - RANDOM BLOCK WRITE
%TInt 21 29%T -- DOS - PARSE FILENAME
%TInt 21 2A%T -- DOS - GET CURRENT DATE
%TInt 21 2B%T -- DOS - SET CURRENT DATE
%TInt 21 2C%T -- DOS - GET CURRENT TIME
%TInt 21 2D%T -- DOS - SET CURRENT TIME
%TInt 21 2E%T -- DOS - SET VERIFY FLAG
%TInt 21 2F%T -- DOS 2+ - GET DISK TRANSFER AREA ADDRESS
%TInt 21 30%T -- DOS 2+ - GET DOS VERSION
%TInt 21 31%T -- DOS 2+ - TERMINATE BUT STAY RESIDENT
%TInt 21 32%T -- DOS Internal - GET DRIVE PARAMETER BLOCK
%TInt 21 33%T -- DOS 2+ - EXTENDED CONTROL-BREAK CHECKING
%TInt 21 34%T -- DOS Internal - RETURN CritSectFlag POINTER
%TInt 21 35%T -- DOS 2+ - GET INTERRUPT VECTOR
%TInt 21 36%T -- DOS 2+ - GET DISK SPACE
%TInt 21 37%T -- DOS Internal - SWITCHAR/AVAILDEV
%TInt 21 38%T -- DOS 2+ - GET COUNTRY-DEPENDENT INFORMATION
%TInt 21 39%T -- DOS 2+ - CREATE A SUBDIRECTORY (MKDIR)
%TInt 21 3A%T -- DOS 2+ - REMOVE A DIRECTORY ENTRY (RMDIR)
%TInt 21 3B%T -- DOS 2+ - CHANGE THE CURRENT DIRECTORY (CHDIR)
%TInt 21 3C%T -- DOS 2+ - CREATE A FILE WITH HANDLE (CREAT)
%TInt 21 3D%T -- DOS 2+ - OPEN DISK FILE WITH HANDLE
%TInt 21 3E%T -- DOS 2+ - CLOSE A FILE WITH HANDLE
%TInt 21 3F%T -- DOS 2+ - READ FROM FILE WITH HANDLE
%TInt 21 40%T -- DOS 2+ - WRITE TO FILE WITH HANDLE
%TInt 21 41%T -- DOS 2+ - DELETE A FILE (UNLINK)
%TInt 21 42%T -- DOS 2+ - MOVE FILE READ/WRITE POINTER (LSEEK)
%TInt 21 43%T -- DOS 2+ - GET/PUT FILE ATTRIBUTES (CHMOD)
%TInt 21 44%T IOCTL
%TInt 21 45%T -- DOS 2+ - CREATE DUPLICATE HANDLE (DUP)
%TInt 21 46%T -- DOS 2+ - FORCE DUPLICATE HANDLE (FORCDUP,DUP2)
%TInt 21 47%T -- DOS 2+ - GET CURRENT DIRECTORY
%TInt 21 48%T -- DOS 2+ - ALLOCATE MEMORY
%TInt 21 49%T -- DOS 2+ - FREE MEMORY
%TInt 21 4A%T -- DOS 2+ - ADJUST MEMORY BLOCK SIZE (SETBLOCK)
%TInt 21 4B%T -- DOS 2+ - LOAD OR EXECUTE (EXEC)
%TInt 21 4C%T -- DOS 2+ - QUIT WITH EXIT CODE (EXIT)
%TInt 21 4D%T -- DOS 2+ - GET EXIT CODE OF SUBPROGRAM (WAIT)
%TInt 21 4E%T -- DOS 2+ - FIND FIRST ASCIZ (FIND FIRST)
%TInt 21 4F%T -- DOS 2+ - FIND NEXT ASCIZ (FIND NEXT)
%TInt 21 50%T -- DOS Internal - SET PSP SEGMENT
%TInt 21 51%T -- DOS Internal - GET PSP SEGMENT
%TInt 21 52%T -- DOS Internal - GET LIST OF LISTS
%TInt 21 53%T -- DOS Internal - TRANSLATE BPB
%TInt 21 54%T -- DOS 2+ - GET VERIFY FLAG
%TInt 21 55%T -- DOS Internal - CREATE PSP
%TInt 21 56%T -- DOS 2+ - RENAME A FILE
%TInt 21 57%T -- DOS 2+ - GET/SET FILE'S DATE/TIME
%TInt 21 58%T -- DOS 3.x - GET/SET MEMORY ALLOCATION STRATEGY
%TInt 21 59%T -- DOS 3.x - GET EXTENDED ERROR CODE
%TInt 21 5A%T -- DOS 3.x - CREATE UNIQUE FILE
%TInt 21 5B%T -- DOS 3.x - CREATE NEW FILE
%TInt 21 5C%T -- DOS 3.x - LOCK/UNLOCK FILE ACCESS
%TInt 21 5D%T -- DOS 3.x - Internal
%TInt 21 5E%T -- DOS 3.1 + Microsoft Networks
%TInt 21 5F%T -- DOS 3.1 + Microsoft Networks
%TInt 21 60%T -- DOS 3.x Internal - RESOLVE PATH STRING TO FULLY QUALIFIED PATH STRING
%TInt 21 61%T -- DOS 3.x Internal - UNUSED
%TInt 21 62%T -- DOS 3.x - GET PSP ADDRESS
%TInt 21 63%T -- DOS 2.25 only - GET LEAD BYTE TABLE
%TInt 21 64%T -- DOS 3.2 Internal - ???
%TInt 21 65%T -- DOS 3.3 - GET EXTENDED COUNTRY INFORMATION
%TInt 21 66%T -- DOS 3.3 - GET/SET GLOBAL CODE PAGE TABLE
%TInt 21 67%T -- DOS 3.3 - SET HANDLE COUNT
%TInt 21 68%T -- DOS 3.3 - COMMIT FILE, WRITE ALL BUFFERED DATA TO DISK
%TInt 21 6C%T 00 DOS 4.0 - EXTENDED OPEN/CREATE
%TInt 21 B6%T -- Novell NetWare SFT Level II - EXTENDED FILE ATTRIBUTES
%TInt 21 B8%T -- Novell Advanced NetWare 2.0+ - PRINT JOBS
%TInt 21 BB%T -- Novell NetWare 4.0 - SET END OF JOB STATUS
%TInt 21 BC%T -- Novell NetWare 4.6 - LOG PHYSICAL RECORD
%TInt 21 BD%T -- Novell NetWare 4.6 - RELEASE PHYSICAL RECORD
%TInt 21 BE%T -- Novell NetWare 4.6 - CLEAR PHYSICAL RECORD
%TInt 21 BF%T -- Novell NetWare 4.6 - LOG RECORD (FCB)
%TInt 21 C0%T -- Novell NetWare 4.6 - RELEASE RECORD (FCB)
%TInt 21 C1%T -- Novell NetWare 4.6 - CLEAR RECORD (FCB)
%TInt 21 C2%T -- Novell NetWare 4.6 - LOCK PHYSICAL RECORD SET
%TInt 21 C3%T -- Novell NetWare 4.6 - RELEASE PHYSICAL RECORD SET
%TInt 21 C4%T -- Novell NetWare 4.6 - CLEAR PHYSICAL RECORD SET
%TInt 21 C5%T -- Novell NetWare 4.6 - SEMAPHORES
%TInt 21 C6%T -- Novell NetWare 4.6 - GET OR SET LOCK MODE
%TInt 21 C7%T -- Novell NetWare 4.0 - TTS
%TInt 21 C8%T -- Novell NetWare 4.0 - BEGIN LOGICAL FILE LOCKING
%TInt 21 C9%T -- Novell NetWare 4.0 - END LOGICAL FILE LOCKING
%TInt 21 CA%T -- Novell NetWare 4.0 - LOG PERSONAL FILE (FCB)
%TInt 21 CB%T -- Novell NetWare 4.0 - LOCK FILE SET
%TInt 21 CC%T -- Novell NetWare 4.0 - RELEASE FILE (FCB)
%TInt 21 CD%T -- Novell NetWare 4.0 - RELEASE FILE SET
%TInt 21 CE%T -- Novell NetWare 4.0 - CLEAR FILE (FCB)
%TInt 21 CF%T -- Novell NetWare 4.0 - CLEAR FILE SET
%TInt 21 D0%T -- Novell NetWare 4.6 - LOG LOGICAL RECORD
%TInt 21 D1%T -- Novell NetWare 4.6 - LOCK LOGICAL RECORD SET
%TInt 21 D2%T -- Novell NetWare 4.0 - RELEASE LOGICAL RECORD
%TInt 21 D3%T -- Novell NetWare 4.0 - RELEASE LOGICAL RECORD SET
%TInt 21 D4%T -- Novell NetWare 4.0 - CLEAR LOGICAL RECORD
%TInt 21 D5%T -- Novell NetWare 4.0 - CLEAR LOGICAL RECORD SET
%TInt 21 D6%T -- Novell NetWare 4.0 - END OF JOB
%TInt 21 D7%T -- Novell NetWare 4.0 - SYSTEM LOGOUT
%TInt 21 DA%T -- Novell NetWare 4.0 - GET VOLUME STATISTICS
%TInt 21 DB%T -- Novell NetWare 4.0 - GET NUMBER OF LOCAL DRIVES
%TInt 21 DC%T -- Novell NetWare 4.0 - GET STATION NUMBER
%TInt 21 DD%T -- Novell NetWare 4.0 - SET ERROR MODE
%TInt 21 DE%T -- Novell NetWare 4.0 - SET BROADCAST MODE
%TInt 21 DF%T -- Novell NetWare 4.0 - CAPTURE
%TInt 21 E0%T -- Novell NetWare 4.0 - PRINT SPOOLING
%TInt 21 E1%T -- Novell NetWare 4.0 - BROADCAST MESSAGES
%TInt 21 E2%T -- Novell NetWare 4.0 - DIRECTORY FUNCTIONS
%TInt 21 E3%T -- Novell NetWare 4.0 - CONNECTION CONTROL
%TInt 21 E4%T -- Novell NetWare 4.0 - SET FILE ATTRIBUTES (FCB)
%TInt 21 E4%T 00 DoubleDos - INSTALLATION CHECK
%TInt 21 E5%T -- Novell NetWare 4.0 - UPDATE FILE SIZE (FCB)
%TInt 21 E6%T -- Novell NetWare 4.0 - COPY FILE TO FILE (FCB)
%TInt 21 E7%T -- Novell NetWare 4.0 - GET FILE SERVER DATE AND TIME
%TInt 21 E8%T -- Novell NetWare 4.6 - SET FCB RE-OPEN MODE
%TInt 21 E9%T -- Novell NetWare 4.6 - SHELL'S "GET BASE STATUS"
%TInt 21 EA%T -- Novell NetWare 4.6 - RETURN SHELL VERSION
%TInt 21 EA%T -- DoubleDos - TURN OFF TASK SWITCHING
%TInt 21 EB%T -- Novell NetWare 4.6 - LOG FILE
%TInt 21 EB%T -- DoubleDos - TURN ON TASK SWITCHING
%TInt 21 EC%T -- Novell NetWare 4.6 - RELEASE FILE
%TInt 21 EC%T -- DoubleDos - GET VIRTUAL SCREEN ADDRESS
%TInt 21 ED%T -- Novell NetWare - CLEAR FILE
%TInt 21 EE%T -- Novell NetWare 4.6 - GET PHYSICAL STATION NUMBER
%TInt 21 EE%T -- DoubleDos - GIVE AWAY TIME TO OTHER TASKS
%TInt 21 EF%T -- Novell Advanced NetWare 1.0+ - GET DRIVE INFO
%TInt 21 F0%T -- Novell Advanced NetWare 1.0+ - CONNECTION ID
%TInt 21 F1%T -- Novell Advanced NetWare 1.0+ - FILE SERVER CONNECTION
%TInt 21 F2%T -- Novell NetWare - ???
%TInt 21 F3%T -- Novell Advanced NetWare 2.0+ - FILE SERVER FILE COPY
%TInt 21 FF%T -- CED - INSTALLABLE COMMANDS

---
+++Int 21 44
%TInt 21 44 00%T DOS 2+ - IOCTL - GET DEVICE INFORMATION
%TInt 21 44 01%T DOS 2+ - IOCTL - SET DEVICE INFORMATION
%TInt 21 44 02%T DOS 2+ - IOCTL - READ CHARACTER DEVICE CONTROL STRING
%TInt 21 44 03%T DOS 2+ - IOCTL - WRITE CHARACTER DEVICE CONTROL STRING
%TInt 21 44 04%T DOS 2+ - IOCTL - READ BLOCK DEVICE CONTROL STRING
%TInt 21 44 05%T DOS 2+ - IOCTL - WRITE BLOCK DEVICE CONTROL STRING
%TInt 21 44 06%T DOS 2+ - IOCTL - GET INPUT STATUS
%TInt 21 44 07%T DOS 2+ - IOCTL - GET OUTPUT STATUS
%TInt 21 44 08%T DOS 3.x - IOCTL - BLOCK DEVICE CHANGEABLE
%TInt 21 44 09%T DOS 3.x - IOCTL - BLOCK DEVICE LOCAL
%TInt 21 44 0A%T DOS 3.x - IOCTL - HANDLE LOCAL
%TInt 21 44 0B%T DOS 3.x - IOCTL - SET SHARING RETRY COUNT
%TInt 21 44 0C%T DOS 3.2 - IOCTL - GENERIC
%TInt 21 44 0D%T DOS 3.2 - IOCTL - BLOCK DEVICE REQUEST
%TInt 21 44 0E%T DOS 3.2 - IOCTL - GET LOGICAL DRIVE MAP
%TInt 21 44 0F%T DOS 3.2 - IOCTL - SET LOGICAL DRIVE MAP

---
+++Int 21 5E
%TInt 21 5E 00%T DOS 3.1 + Microsoft Networks - GET MACHINE NAME
%TInt 21 5E 01%T DOS 3.1 + Microsoft Networks - SET MACHINE NAME
%TInt 21 5E 02%T DOS 3.1 + Microsoft Networks - SET PRINTER SETUP
%TInt 21 5E 03%T DOS 3.1 + Microsoft Networks - GET PRINTER SETUP

---
+++Int 21 5F
%TInt 21 5F 02%T DOS 3.1 + Microsoft Networks - GET REDIRECTION LIST ENTRY
%TInt 21 5F 03%T DOS 3.1 + Microsoft Networks - REDIRECT DEVICE
%TInt 21 5F 04%T DOS 3.1 + Microsoft Networks - CANCEL REDIRECTION


---
+++Int 21 00

INT 21 - DOS - PROGRAM TERMINATION
	AH = 00h
Return: never

---
+++Int 21 01

INT 21 - DOS - KEYBOARD INPUT
	AH = 01h
Return: AL = character read
Note: ^C/^Break are checked, and INT 23h executed if read
      character is echoed to standard output

---
+++Int 21 02

INT 21 - DOS - DISPLAY OUTPUT
	AH = 02h
	DL = character to send to standard output
Note: ^C/^Break are checked, and INT 23h executed if pressed

---
+++Int 21 03

INT 21 - DOS - AUX INPUT
	AH = 03h
Return: AL = character read

---
+++Int 21 04

INT 21 - DOS - AUX OUTPUT
	AH = 04h
	DL = character to send

---
+++Int 21 05

INT 21 - DOS - PRINTER OUTPUT
	AH = 05h
	DL = character to print

---
+++Int 21 06

INT 21 - DOS - DIRECT CONSOLE I/O CHARACTER OUTPUT
	AH = 06h
	DL = character <> FFh
─────────────────────────────────────────────────
INT 21 - DOS - DIRECT CONSOLE I/O CHARACTER INPUT
	AH = 06h
	DL = 0FFh
Return: ZF set	 = no character
	ZF clear = character recieved
		  AL = character
Notes: Character is echoed to STDOUT if received.
       ^C/^Break are NOT checked

---
+++Int 21 07

INT 21 - DOS - DIRECT STDIN INPUT, NO ECHO
	AH = 07h
Note: same as function 06h for input but char not echoed

---
+++Int 21 08

INT 21 - DOS - KEYBOARD INPUT, NO ECHO
	AH = 08h
Return: AL = character
Note: same as function 07h, but ^C/^Break are checked

---
+++Int 21 09

INT 21 - DOS - PRINT STRING
	AH = 09h
	DS:DX = address of string terminated by "$"
Note: ^C/^Break checked, and INT 23h called if pressed

---
+++Int 21 0A

INT 21 - DOS - BUFFERED KEYBOARD INPUT
	AH = 0Ah
	DS:DX = address of buffer
Note: first byte of buffer must contain maximum length
      on entry, second byte contains actual length of previous line which may
	be recalled with the DOS line-editing commands
      on return the second byte contains actual length, third and
	subsequent bytes contain the input line

---
+++Int 21 0B

INT 21 - DOS - CHECK STANDARD INPUT STATUS
	AH = 0Bh
Return: AL = FFh if character available
	     00h if no character
Note: ^C/^Break checked, and INT 23h called if pressed

---
+++Int 21 0C

INT 21 - DOS - CLEAR KEYBOARD BUFFER
	AH = 0Ch
	AL must be 1, 6, 7, 8, or 0Ah.
Notes: Flushes all typeahead input, then executes function specified by AL
       (effectively moving it to AH and repeating the INT 21 call).
       If AL contains a value not in the list above, the keyboard buffer is
       flushed and no other action is taken.

---
+++Int 21 0D

INT 21 - DOS - DISK RESET
	AH = 0Dh
Note: Flushes all disk buffers.

---
+++Int 21 0E

INT 21 - DOS - SELECT DISK
	AH = 0Eh
	DL = new default drive number (0 = A, 1 = B, etc.)
Return: AL = number of logical drives

---
+++Int 21 0F

INT 21 - DOS - OPEN DISK FILE
	AH = 0Fh
	DS:DX = address of FCB
Return: AL = 00h file found
	     FFh file not found
Note: (DOS 3.x) file opened in compatibility mode

---
+++Int 21 16

INT 21 - DOS - CLOSE DISK FILE
	AH = 10h
	DS:DX = address of FCB
Return: AL = 00h directory update successful
	     FFh file not found in directory

---
+++Int 21 11

INT 21 - DOS - SEARCH FIRST USING FCB
	AH = 11h
	DS:DX = address of FCB
Return: AL = status
	    00h file found
	    FFh file not found
Note: If file found, FCB is created at DTA address and set up to
      OPEN or DELETE it.

---
+++Int 21 12

INT 21 - DOS - SEARCH NEXT USING FCB
	AH = 12h
	DS:DX = address of FCB
Return: AL = status
	    00h file found
	    FFh file not found
Note: If file found, FCB is created at DTA address and set up to
      OPEN or DELETE it.

---
+++Int 21 13

INT 21 - DOS - DELETE FILE via FCB
	AH = 13h
	DS:DX = address of FCB with filename field filled with template for
		deletion ('?' wildcard allowed)
Return: AL = status
	    00h file found
	    FFh file not found

---
+++Int 21 14

INT 21 - DOS - SEQUENTIAL DISK FILE READ
	AH = 14h
	DS:DX = address of FCB
Return: AL = status
	    0 successful read
	    1 end of file
	    2 data transfer area too small
	    3 partial record, EOF

---
+++Int 21 15

INT 21 - DOS - SEQUENTIAL DISK RECORD WRITE
	AH = 15h
	DS:DX = address of FCB
Return: AL = status
	    0 successful write
	    1 disk full
	    2 data transfer area too small

---
+++Int 21 16

INT 21 - DOS - CREATE A DISK FILE
	AH = 16h
	DS:DX = address of FCB
Return: AL = status
	    00h successful creation
	    FFh directory full
Note: if file already exists, it is truncated to zero length

---
+++Int 21 17

INT 21 - DOS - RENAME FILE via FCB
	AH = 17h
	DS:DX = address of FCB
	FCB contains new name starting at byte 17h.
Return: AL = status
	    00h file found
	    FFh file not found

---
+++Int 21 18

INT 21 - DOS Internal - UNUSED
	AH = 18h
Return: AL = 0

---
+++Int 21 19

INT 21 - DOS - GET DEFAULT DISK NUMBER
	AH = 19h
Return: AL = current drive number (letter - 'A')

---
+++Int 21 1A

INT 21 - DOS - SET DISK TRANSFER AREA ADDRESS
	AH = 1Ah
	DS:DX = address of buffer

---
+++Int 21 1B

INT 21 - DOS - ALLOCATION TABLE INFORMATION
	AH = 1Bh
Return: DS:BX points to FAT ID byte for default drive
	DX = number of allocation units on disk
	AL = number of sectors per allocation unit (cluster)
	CX = number of bytes per sector

---
+++Int 21 1C

INT 21 - DOS - ALLOCATION TABLE INFORMATION FOR SPECIFIC DEVICE
	AH = 1Ch
	DL = Drive Number to check
Return: DS:BX points to FAT ID byte
	DX = number of allocation units on disk
	AL = number of sectors per allocation unit (cluster)
	CX = number of bytes per sector

---
+++Int 21 1D

INT 21 - DOS Internal - UNUSED
	AH = 1Dh
Return: AL = 0

---
+++Int 21 1E

INT 21 - DOS Internal - UNUSED
	AH = 1Eh
Return: AL = 0

---
+++Int 21 1F

INT 21 - DOS Internal - GET DEFAULT DRIVE PARAMETER BLOCK
	AH = 1Fh
Return: AL = 00h No Error
	     FFh Error
	DS:BX -> drive parameter block
Note: for DOS 2.x and 3.x, this just invokes function 32h with DL = 0

---
+++Int 21 20

INT 21 - DOS Internal - UNUSED
	AH = 20h
Return: AL = 0

---
+++Int 21 21

INT 21 - DOS - RANDOM DISK RECORD READ
	AH = 21h
	DS:DX = address of FCB
Return: AL = status
	    0 successful read
	    1 end of file
	    2 data transfer area too small
	    3 partial record, EOF

---
+++Int 21 22

INT 21 - DOS - RANDOM DISK RECORD WRITE
	AH = 22h
	DS:DX = address of FCB
Return: AL = status (see AH = 21h above)

---
+++Int 21 23

INT 21 - DOS - GET FILE SIZE
	AH = 23h
	DS:DX = address of unopened FCB with filename and record size fields
		initialized
Return: AL = status
	    00h file found
	    FFh file not found
Note: FCB's random-record field set to number of records (rounded up)

---
+++Int 21 24

INT 21 - DOS - SET RANDOM RECORD FIELD
	AH = 24h
	DS:DX = address of FCB
Return: Random Record Field of FCB is set to be same as Current Block
	and Current Record.
Note: FCB must be OPEN already

---
+++Int 21 25

INT 21 - DOS - SET INTERRUPT VECTOR
	AH = 25h
	AL = interrupt number
	DS:DX = new vector to be used for specified interrupt

---
+++Int 21 26

INT 21 - DOS - CREATE PSP
	AH = 26h
	DX = Segment number to set up PSP at
Return: Current PSP is copied to specified segment
Note:	new PSP is updated with memory size information; INTs 22h, 23h, 24h
	taken from interrupt vector table

---
+++Int 21 27

INT 21 - DOS - RANDOM BLOCK READ
	AH = 27h
	DS:DX = address of FCB
	CX = number of records to be read
Return: AL = status
	    0 successful read
	    1 end of file
	    2 data transfer area too small
	    3 partial record, EOF

---
+++Int 21 28

INT 21 - DOS - RANDOM BLOCK WRITE
	AH = 28h
	DS:DX = address of FCB
	CX = number of records to be written
	     if zero, truncate file to current random file position
Return: AL = status
	    0 successful write
	    1 disk full
	    2 data transfer area too small

---
+++Int 21 29

INT 21 - DOS - PARSE FILENAME
	AH = 29h
	DS:SI -> string to parse
	ES:DI -> buffer to fill with unopened FCB
	AL = bit mask to control parsing
	    0 = 0: parsing stops if file separator found
		1: leading separator ignored
	    1 = 0: drive number in FCB set to default drive if not present
		   in string
		1: drive number in FCB not changed
	    2 = 0: filename in FCB set to blanks if no filename in string
		1: filename in FCB not changed if string does not contain
		   a filename
	    3 = 0: extension in FCB set to blanks if no extension in string
		1: extension left unchanged
Return: AL = 00h: no wildcards in name or extension
	     01h: wildcards appeared
	     FFh: drive specifier invalid
	DS:SI -> first byte after parsed string
	ES:DI buffer filled with unopened FCB

---
+++Int 21 2A

INT 21 - DOS - GET CURRENT DATE
	AH = 2Ah
Return: DL = day
	DH = month
	CX = year
	AL = day of the week (0=Sunday, 1=Monday, etc.)

---
+++Int 21 2B

INT 21 - DOS - SET CURRENT DATE
	AH = 2Bh
	DL = day
	DH = month
	CX = year
Return: AL = 00h if no error
	   = FFh if bad value sent to routine
Note: DOS 3.3 also sets CMOS clock
─────────────────────────────────────────────────-
INT 21 - DESQview - INSTALLATION CHECK
	AH = 2Bh
	AL = subfunction (DV v2.00+)
	    01h get version
		Return: BX = version (BH = major, BL = minor)
		Note: early copies of v2.00 return 0002h
	    02h get shadow buffer info, and start shadowing
		Return: BH = rows in shadow buffer
			BL = columns in shadow buffer
			DX = segment of shadow buffer
	    04h get shadow buffer info
		Return: BH = rows in shadow buffer
			BL = columns in shadow buffer
			DX = segment of shadow buffer
	    05h stop shadowing
	CX = 4445h ('DE')
	DX = 5351h ('SQ')
Return: AL = FFh if DESQview not installed
Note:	in DESQview v1.x, there were no subfunctions; this call only identified
	whether or not DESQview was loaded

---
+++Int 21 2C

INT 21 - DOS - GET CURRENT TIME
	AH = 2Ch
Return: CH = hours
	CL = minutes
	DH = seconds
	DL = hundredths of seconds
Note: time is updated approximately every 55/1000 second

---
+++Int 21 2D

INT 21 - DOS - SET CURRENT TIME
	AH = 2Dh
	CH = hours
	CL = minutes
	DH = seconds
	DL = hundredths of seconds
Return: AL = 00h if no error
	   = FFh if bad value sent to routine
Note: DOS 3.3 also sets CMOS clock

---
+++Int 21 2E

INT 21 - DOS - SET VERIFY FLAG
	AH = 2Eh
	DL = 0
	AL = 1 VERIFY on
	     0 VERIFY off

---
+++Int 21 2F

INT 21 - DOS 2+ - GET DISK TRANSFER AREA ADDRESS
	AH = 2Fh
Return: ES:BX = address of DTA

---
+++Int 21 30

INT 21 - DOS 2+ - GET DOS VERSION
	AH = 30h
Return: AL = Major Version number (0 for DOS 1.x)
	AH = Minor Version number
	BH = OEM number
	    00h IBM
	    16h DEC
	BL:CX = 24-bit user number

---
+++Int 21 31

INT 21 - DOS 2+ - TERMINATE BUT STAY RESIDENT
	AH = 31h
	AL = exit code
	DX = program size, in paragraphs

---
+++Int 21 32

INT 21 - DOS Internal - GET DRIVE PARAMETER BLOCK
	AH = 32h
	DL = drive number
	    0 = default, 1 = A, etc.
Return: AL = 0FFh if invalid drive number, else
	DS:BX -> drive parameter block.

Structure of DOS Drive Parameter Block:
Offset	Size	Description
 00h	BYTE	drive number (0 = A, etc.)
 01h	BYTE	unit number within device driver
 02h	WORD	number of bytes per sector
 04h	BYTE	largest sector number in cluster (one less than sect/clust)
 05h	BYTE	log base two of the cluster size
 06h	WORD	number of reserved (boot) sectors
 08h	BYTE	number of copies of the FAT
 09h	WORD	number of root directory entries
 0Bh	WORD	first data sector on medium
 0Dh	WORD	largest possible cluster number (one more than # data clust)
 0Fh	BYTE	number of sectors in one FAT copy
 10h	WORD	first sector of root directory
 12h	DWORD	address of device driver for this drive
 16h	BYTE	media descriptor byte for medium
 17h	BYTE	FFh indicates block must be rebuilt
		(DOS 3.x) 00h indicates block accessed
 18h	DWORD	address of next device block, offset = FFFFh indicates last
--DOS 2.x only--
 1Ch	WORD	starting cluster of current directory (0 = root directory)
 1Eh 64 BYTEs	ASCIZ current directory path string
--DOS 3.x--
; this was always:
 1Ch	WORD = 0	probably unused, values left from before
 1Eh	WORD = 0FFFFh	block was built

---
+++Int 21 33

INT 21 - DOS 2+ - EXTENDED CONTROL-BREAK CHECKING
	AH = 33h
	AL = subfunction
	    00h get state
	    01h set state
	       DL = 0 for OFF or 1 for ON
	    02h internal, called by PRINT.COM (DOS 3.1)
	    05h internal, return boot drive in DL (1=A:) (not in DOS 3.1)
Return: DL = current BREAK setting if AL = 00h
	    0 BREAK=OFF
	    1 BREAK=ON
	AL = FFh if error

---
+++Int 21 34

INT 21 - DOS Internal - RETURN CritSectFlag POINTER
	AH = 34h
Return: ES:BX -> 1-byte DOS "Critical Section Flag", also known as InDOS flag
Notes:	when the critical section flag is nonzero, code within DOS is being
	executed.  It is safe to enter DOS when both the critical section flag
	and the critical error flag are zero.

	The critical error flag is the byte after the critical section flag in
	DOS 2.x, and the byte BEFORE the critical section flag in DOS 3.x
	(except COMPAQ DOS 3.0, where the critical error flag is located 1AAh
	bytes BEFORE the critical section flag)

---
+++Int 21 35

INT 21 - DOS 2+ - GET INTERRUPT VECTOR
	AH = 35h
	AL = interrupt number
Return: ES:BX = value of interrupt vector

---
+++Int 21 36

INT 21 - DOS 2+ - GET DISK SPACE
	AH = 36h
	DL = drive code (0 = default, 1 = A, 2 = B, etc.)
Return: AX = number of sectors per cluster
	     or 0FFFFh if invalid drive
	BX = number of available clusters
	CX = bytes per sector
	DX = total clusters
Note: multiply AX * CX * BX for free space on disk
      multiply AX * CX * DX for total disk space

---
+++Int 21 37

INT 21 - DOS Internal - SWITCHAR/AVAILDEV
	AH = 37h
	AL = subfunction
	   0 Read switch character (returns current character in DL)
	   1 Set switch character (specify new character in DL)
	   2 (DOS 2.x only) Read device availability (as set by function AL=3)
	   3 (DOS 2.x only) Set device availability, where:
	     DL = 0 means /DEV/ must preceed device names
	     DL <> 0 means /DEV/ need not preceed device names
Return: DL = Switch character (if AL=0 or 1)
	     Device availability flag (if AL=2 or 3)
	AL=0FFh means the value in AL was not in the range 0-3.

---
+++Int 21 38

INT 21 - DOS 2+ - GET COUNTRY-DEPENDENT INFORMATION
	AH = 38h
--DOS 2.x--
	AL = 0	get current-country info
	DS:DX = segment:offset of buffer for returned info
Return: BX = country code
	buffer at DS:DX filled as follows:
	   bytes 0-1 = date format   0 = USA	mm dd yy
				     1 = Europe dd mm yy
				     2 = Japan	yy mm dd
	   byte 2    = currency symbol
	   byte 3    = 00h
	   byte 4    = thousands separator char
	   byte 5    = 00h
	   byte 6    = decimal separator char
	   byte 7    = 00h
	   bytes 8-1Fh reserved

--DOS 3.x--
	AL = 0 for current country
	AL = 01h thru 0FEh for specific country with code <255
	AL = 0FFh for specific country with code >= 255
	   BX = 16-bit country code
	DS:DX = segment:offset of buffer for returned info
	DX = 0FFFFh if setting country code, rather than getting info
Return: (if DX <> 0FFFFh)
	BX = country code
	DS:DX filled in:
	      bytes 0-1 = date format (see above)
	      bytes 2-6 = currency symbol string, ASCIZ
	      byte 7	= thousands seaprator char
	      byte 8	= 00h
	      byte 9	= decimal separator char
	      byte 0Ah	= 00h
	      byte 0Bh	= date separator char
	      byte 0Ch	= 00h
	      byte 0Dh	= time separator char
	      byte 0Eh	= 00h
	      byte 0Fh	= currency format
			   bit 2 = set if currency symbol replaces decimal pt
			   bit 1 = number of spaces between value and curr sym
			   bit 0 = 0 if currency symbol precedes value
				   1 if currency symbol follows value
	      byte 10h	= number of digits after decimal in currency
	      byte 11h	= time format
			   bit 0 = 0 if 12-hour clock
				   1 if 24-hour clock
	      bytes 12h-15h = address of case map routine (FAR CALL, AL = char)
	      byte 16h	= data-list separator char
	      byte 17h	= 00h
	      bytes 18h-21h reserved
      If error:
	CF set
	AX = error code

---
+++Int 21 39

INT 21 - DOS 2+ - CREATE A SUBDIRECTORY (MKDIR)
	AH = 39h
	DS:DX = address of ASCIZ pathname
Return: CF set on error
	    AX = Error Code

---
+++Int 21 3A

INT 21 - DOS 2+ - REMOVE A DIRECTORY ENTRY (RMDIR)
	AH = 3Ah
	DS:DX = address of ASCIZ pathname
Return: CF set on error
	    AX = Error Code

---
+++Int 21 3B

INT 21 - DOS 2+ - CHANGE THE CURRENT DIRECTORY (CHDIR)
	AH = 3Bh
	DS:DX = address of ASCIZ directory name
Return: CF set on error
	    AX = Error Code

---
+++Int 21 3C

INT 21 - DOS 2+ - CREATE A FILE WITH HANDLE (CREAT)
	AH = 3Ch
	CX = attributes for file
	    bit 0: read-only
		1: hidden
		2: system
		3: volume label
		4: reserved, must be zero (directory)
		5: archive bit
		7: if set, file is shareable under Novell NetWare
	DS:DX = address of ASCIZ filename
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = file handle

---
+++Int 21 3D

INT 21 - DOS 2+ - OPEN DISK FILE WITH HANDLE
	AH = 3Dh
	AL = access code
	    0 = Read Only
	    1 = Write Only
	    2 = Read/Write
	AL bits 7-3 = file-sharing modes (DOS 3.x)
	    bit 7    = inheritance flag, set for no inheritance
	    bits 4-6 = sharing mode
		      000 compatibility mode
		      001 exclusive (deny all)
		      010 write access denied (deny write)
		      011 read access denied (deny read)
		      100 full access permitted (deny none)
	    bit 3    = reserved, should be zero
	DS:DX = address of ASCIZ filename
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = file handle

---
+++Int 21 3E

INT 21 - DOS 2+ - CLOSE A FILE WITH HANDLE
	AH = 3Eh
	BX = file handle
Return: CF set on error
	    AX = error code

---
+++Int 21 3F

INT 21 - DOS 2+ - READ FROM FILE WITH HANDLE
	AH = 3Fh
	BX = file handle
	CX = number of bytes to read
	DS:DX = address of buffer
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = number of bytes read

---
+++Int 21 40

INT 21 - DOS 2+ - WRITE TO FILE WITH HANDLE
	AH = 40h
	BX = file handle
	CX = number of bytes to write
	DS:DX -> buffer
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = number of bytes written
Note: if CX is zero, no data is written, and the file is truncated or extended
      to the current position

---
+++Int 21 41

INT 21 - DOS 2+ - DELETE A FILE (UNLINK)
	AH = 41h
	DS:DX -> ASCIZ name of file to delete
Return: CF set on error
	    AX = error code

---
+++Int 21 42

INT 21 - DOS 2+ - MOVE FILE READ/WRITE POINTER (LSEEK)
	AH = 42h
	AL = method value
	    0 = offset from beginning of file
	    1 = offset from present location
	    2 = offset from end of file
	BX = file handle
	CX:DX = offset in bytes
Return: CF set on error
	    AX = error code
	CF clear if successful
	    DX:AX = new offset

---
+++Int 21 43

INT 21 - DOS 2+ - GET/PUT FILE ATTRIBUTES (CHMOD)
	AH = 43h
	AL =
	    0 = get file attributes
	    1 = put file attributes
	       CX = file attribute bits
		   0 = read only
		   1 = hidden file
		   2 = system file
		   3 = volume label
		   4 = subdirectory
		   5 = written since backup
		   8 = shareable (Novell NetWare)
	DS:DX -> ASCIZ file name
Return: CF set on error
	    AX = error code
	CX = file attributes on get

---
+++Int 21 44 00

INT 21 - DOS 2+ - IOCTL - GET DEVICE INFORMATION
	AX = 4400h
	BX = file or device handle
Return: CF set on error
	   AX = error code
	CF clear if successful
	   DX = device info
	   If bit 7 set: (character device)
	       bit 0: console input device
		   1: console output device
		   2: NUL device
		   3: CLOCK$ device
		   4: device is special
		   5: binary (raw) mode
		   6: Not EOF
		  12: network device (DOS 3.x)
		  14: can process IOCTL control strings (func 2-5)
	   If bit 7 clear: (file)
	       bits 0-5 are block device number
		   6: file has not been written
		  12: Network device (DOS 3.x)
		  15: file is remote (DOS 3.x)

---
+++Int 21 44 01

INT 21 - DOS 2+ - IOCTL - SET DEVICE INFORMATION
	AX = 4401h
	BX = device handle
	DH = 0
	DL = device information to set (bits 0-7 from function 0)
Return: CF set on error
	    AX = error code

---
+++Int 21 44 02

INT 21 - DOS 2+ - IOCTL - READ CHARACTER DEVICE CONTROL STRING
	AX = 4402h
	BX = device handle
	CX = number of bytes to read
	DS:DX -> buffer
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = number of bytes read

---
+++Int 21 44 03

INT 21 - DOS 2+ - IOCTL - WRITE CHARACTER DEVICE CONTROL STRING
	AX = 4403h
	BX = device handle
	CX = number of bytes to write
	DS:DX -> buffer
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = number of bytes written

---
+++Int 21 44 04

INT 21 - DOS 2+ - IOCTL - READ BLOCK DEVICE CONTROL STRING
	AX = 4404h
	BL = drive number (0=default)
	CX = number of bytes to read
	DS:DX -> buffer
Return: CF set on error
	   AX = error code
	CF clear if successful
	   AX = number of bytes read

---
+++Int 21 44 05

INT 21 - DOS 2+ - IOCTL - WRITE BLOCK DEVICE CONTROL STRING
	AX = 4405h
	BL = drive number (0=default)
	CX = number of bytes to write
	DS:DX -> buffer
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = number of bytes written

---
+++Int 21 44 06

INT 21 - DOS 2+ - IOCTL - GET INPUT STATUS
	AX = 4406h
	BX = file or device handle
Return: AL = FFh device ready
	     00h device not ready

---
+++Int 21 44 07

INT 21 - DOS 2+ - IOCTL - GET OUTPUT STATUS
	AX = 4407h
	BX = file or device handle
Return: AL = FFh device ready
	     00h device not ready
Note: for DOS 2.x, files are always ready for output

---
+++Int 21 44 08

INT 21 - DOS 3.x - IOCTL - BLOCK DEVICE CHANGEABLE
	AX = 4408h
	BL = drive number (0=default)
Return: AX = 00h removable
	     01h fixed
	     0Fh invalid drive

---
+++Int 21 44 09

INT 21 - DOS 3.x - IOCTL - BLOCK DEVICE LOCAL
	AX = 4409h
	BL = drive number (0=default)
Return: DX = attribute word, bit 12 set if device is remote

---
+++Int 21 44 0A

INT 21 - DOS 3.x - IOCTL - HANDLE LOCAL
	AX = 440Ah
	BX = file handle
Return: DX = attribute word, bit 15 set if file is remote
Note:   if file is remote, Novell Advanced NetWare 2.0 returns the number of
	the file server on which the handle is located in CX

---
+++Int 21 44 0B

INT 21 - DOS 3.x - IOCTL - SET SHARING RETRY COUNT
	AX = 440Bh
	CX = delay (default 1)
	DX = retry count (default 3)
Return: CF set on error
	    AX = error code

---
+++Int 21 44 0C

INT 21 - DOS 3.2 - IOCTL - GENERIC
	AX = 440Ch
	BX = device handle
	CH = category code
	    00h unknown (DOS 3.3)
	    01h COMn: (DOS 3.3)
	    03h CON (DOS 3.3)
	    05h LPTn:
	CL = function
	    45h set iteration count
	    4Ah select code page
	    4Ch start code-page preparation
	    4Dh end code-page preparation
	    65h get iteration count
	    6Ah query selected code page
	    6Bh query prepare list
	DS:DX -> parameter block
	    for CL=45h		WORD  iteration count
	    for CL=4Ah,4Dh,6Ah	WORD  length of data
				WORD  code page ID
	    for CL=4Ch		WORD  flags
				WORD  length of remainder of parameter block
				WORD  number of code pages following
			      N WORDs code page 1,...,N
	    for CL=6Bh		WORD  length of following data
				WORD  number of hardware code pages
			      N WORDs hardware code pages 1,...,N
				WORD  number of prepared code pages
			      N WORDs prepared code pages 1,...,N
Return: CF set on error
	    AX = error code

---
+++Int 21 44 0D

INT 21 - DOS 3.2 - IOCTL - BLOCK DEVICE REQUEST
	AX = 440Dh
	BL = drive number (0=default)
	CH = category code
	    08h disk drive
	CL = function
 	    40h set device parameters
	    41h write logical device track
	    42h format and verify logical device track
	    60h get device parameters
	    61h read logical device track
	    62h verify logical device track
	DS:DX -> parameter block
	for functions 40h, 60h
	    BYTE  special functions
		bit 0 set if function to use current BPB, clear if Device BIOS
			Parameter Block field contains new default BPB
		bit 1 set if function to use track layout fields only
			must be clear if CL=60h
		bit 2 set if all sectors in track same size (should be set)
		bits 3-7 reserved
	    BYTE  device type
		00h  320K/360K disk
		01h  1.2M disk
		02h  720K disk
		03h  single-density 8-inch disk
		04h  double-density 8-inch disk
		05h  fixed disk
		06h  tape drive
		07h  other type of block device
	    WORD  device attributes
		bit 0 set if nonremovable medium
		bit 1 set if door lock supported
		bits 2-15 reserved
	    WORD  number of cylinders
	    BYTE  media type
		00h 1.2M disk (default)
		01h 320K/360K disk
	 31 BYTEs device BPB (see function 53h)
	    WORD  number of sectors per track (start of track layout field)
	  N word pairs: number,size of each sector in track
	for functions 41h, 61h
	    BYTE  reserved, must be zero
	    WORD  number of disk head
	    WORD  number of disk cylinder
	    WORD  number of first sector to read/write
	    WORD  number of sectors
	    DWORD transfer address
	for functions 42h, 62h
	    BYTE  reserved, must be zero
	    WORD  number of disk head
	    WORD  number of disk cylinder
Return: CF set on error
	   AX = error code

---
+++Int 21 44 0E

INT 21 - DOS 3.2 - IOCTL - GET LOGICAL DRIVE MAP
	AX = 440Eh
	BL = drive number (0=default)
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AL = 0 block device has only one logical drive assigned
		 1..26 the last letter used to reference the drive (1=A:,etc)

---
+++Int 21 44 0F

INT 21 - DOS 3.2 - IOCTL - SET LOGICAL DRIVE MAP
	AX = 440Fh
	BL = physical drive number (0=default)
Return: CF set on error
	    AX = error code
Note: maps logical drives to physical drives, similar to DOS's treatment of
	a single physical floppy drive as both A: and B:

---
+++Int 21 45

INT 21 - DOS 2+ - CREATE DUPLICATE HANDLE (DUP)
	AH = 45h
	BX = file handle to duplicate
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = new file handle

---
+++Int 21 46

INT 21 - DOS 2+ - FORCE DUPLICATE HANDLE (FORCDUP,DUP2)
	AH = 46h
	BX = Existing file handle
	CX = new file handle
Return: CF set on error
	    AX = error code

---
+++Int 21 47

INT 21 - DOS 2+ - GET CURRENT DIRECTORY
	AH = 47h
	DL = drive (0=default, 1=A, etc.)
	DS:SI points to 64-byte buffer area
Return: CF set on error
	    AX = error code
Note: the returned path does not include the initial backslash

---
+++Int 21 48

INT 21 - DOS 2+ - ALLOCATE MEMORY
	AH = 48h
	BX = number of 16-byte paragraphs desired
Return: CF set on error
	    AX = error code
	    BX = maximum available
	CF clear if successful
	    AX = segment of allocated memory block

---
+++Int 21 49

INT 21 - DOS 2+ - FREE MEMORY
	AH = 49h
	ES = Segment address of area to be freed
Return: CF set on error
	    AX = error code

---
+++Int 21 4A

INT 21 - DOS 2+ - ADJUST MEMORY BLOCK SIZE (SETBLOCK)
	AH = 4Ah
	ES = Segment address of block to change
	BX = New size in paragraphs
Return: CF set on error
	    AX = error code
	    BX = maximum size possible for the block

---
+++Int 21 4B

INT 21 - DOS 2+ - LOAD OR EXECUTE (EXEC)
	AH = 4Bh
	AL = subfunction
	    0 = load and execute program
	    1 = load but do not execute (internal, DOS 3.x & DESQview only)
	    2 = load but do not execute (internal, DOS 2.x only)
	    3 = load overlay; do not create PSP
	DS:DX = filename
	ES:BX = parameter block
	       AL =
		  0: WORD segment of environment (0 = use current)
		     DWORD -> command line
		     DWORD -> FCB 1
		     DWORD -> FCB 2
		  1: WORD segment of environment (0 = use current)
		     DWORD -> command line
		     DWORD -> FCB 1
		     DWORD -> FCB 2
		     DWORD will hold SS:SP on return
		     DWORD will hold program entry point (CS:IP) on return
		  2: WORD segment of environment (0 = use current)
		     DWORD -> command line
		     DWORD -> FCB 1
		     DWORD -> FCB 2
		  3: WORD segment load address
		     WORD segment relocation factor
Return: CF set on error
	    AX = error code
	CF clear if successful
	    if function 1, process ID set to new program's PSP; get with
		function 62h
	    if function 2, new program's initial stack and entry point
		returned in registers
Note: DOS 2.x destroys all registers, including SS:SP

Structure of .EXE file header:
	WORD  0x4d, 0x5a signature (sometimes 5Ah, 4Dh)
	WORD  image size remainder (program size mod 512)
	WORD  file size in pages (program size div 512)
	WORD  number of relocation items
	WORD  header size in paragraphs
	WORD  minimum extra paragraphs needed
	WORD  maximum extra paragraphs needed
	WORD  stack segment
	WORD  stack offset
	WORD  word checksum of entire file
	DWORD initial CS:IP
	WORD  offset of relocation table
	WORD  overlay number

---
+++Int 21 4C

INT 21 - DOS 2+ - QUIT WITH EXIT CODE (EXIT)
	AH = 4Ch
	AL = exit code
Return: never returns

---
+++Int 21 4D

INT 21 - DOS 2+ - GET EXIT CODE OF SUBPROGRAM (WAIT)
	AH = 4Dh
Return: AL = exit code of subprogram (functions 31h or 4Ch)
	AH = circumstance which caused termination
	    0 = Terminate/abort
	    1 = Control-C
	    2 = Hard error
	    3 = Terminate and stay resident

---
+++Int 21 4E

INT 21 - DOS 2+ - FIND FIRST ASCIZ (FIND FIRST)
	AH = 4Eh
	CX = search attributes
	DS:DX -> ASCIZ filename
Return: CF set on error
	    AX = error code
	[DTA] = data block
	      undocumented fields
		  PC-DOS 3.10
		     byte  00h:     drive letter
		     bytes 01h-0Bh: search template
		     byte  0Ch:     search attributes
		  DOS 2.x (and DOS 3.x except 3.1???)
		     byte  00h:     search attributes
		     byte  01h:     drive letter
		     bytes 02h-0Ch: search template
		  bytes 0Dh-0Eh: entry count within directory
		  bytes 0Fh-12h: reserved
		  bytes 13h-14h: cluster number of parent directory
	      byte  15h:     attribute of file found
	      bytes 16h-17h: file time
	      bytes 18h-19h: file date
	      bytes 1Ah-1Dh: file size
	      bytes 1Eh-3Ah: ASCIZ filename+extension

---
+++Int 21 4F

INT 21 - DOS 2+ - FIND NEXT ASCIZ (FIND NEXT)
	AH = 4Fh
	[DTA] = data block from last AH = 4Eh/4Fh call
Return: CF set on error
	    AX = error code
	[DTA] = data block, see AH = 4Eh above

---
+++Int 21 50

INT 21 - DOS Internal - SET PSP SEGMENT
	AH = 50h
	BX = Segment address of new PSP
Note: under DOS 2.xx, this function cannot be invoked inside an INT 28h handler
      without setting the Critical Error flag

---
+++Int 21 51

INT 21 - DOS Internal - GET PSP SEGMENT
	AH = 51h
Return: BX = Current PSP Segment
Note: under DOS 2.xx, this function cannot be invoked inside an INT 28h handler
      without setting the Critical Error flag

Structure of PSP:
 00h  2 BYTEs program exit point
 02h  	WORD  memory size in paragraphs
 04h	BYTE  unused
 05h  5 BYTEs CP/M entry point
 0Ah	DWORD terminate address (old INT 22h)
 0Eh	DWORD break address (old INT 23h)
 12h	DWORD critical error handler (old INT 24h)
 16h	WORD  parent PSP segment
 18h 20 BYTEs DOS 2+ open file table, FFh = unused
 2Ch	WORD  DOS 2+ environment segment
 2Eh	DWORD process's SS:SP
 32h	WORD  DOS 3.x max open files
 36h	DWORD DOS 3.x open file table address
 38h 24 BYTEs unused by DOS versions <= 3.3
 50h  3 BYTEs DOS function dispatcher (FAR routine)
 53h  9 BYTEs unused
 5Ch 16 BYTEs FCB #1, filled in from first commandline argument
 6Ch 20 BYTEs FCB #2, filled in from second commandline argument
 80h 128 BYTEs command tail / default DTA buffer

---
+++Int 21 52

INT 21 - DOS Internal - GET LIST OF LISTS
	AH = 52h
Return: ES:BX points to DOS list of lists

List of Lists:
Bytes	Value
-2&-1	Segment of first memory control block
00h-03h Pointer to first DOS Device Control Block (see function 32h)
04h-07h Pointer to list of DOS file tables
	DWORD pointer to next file table
	WORD  number of files in this table
	35h bytes per file
	  00h-01h number of file handles referring to this file
	  02h	  access mode (see function 3Dh)
	  03h-04h ???
	  05h-06h device info word (see function 44h/AL=00h)
	  07h-0Ah Pointer to device driver header if character device
		  Pointer to DOS Device Control Block if block device (see
		  func 32h for format)
	  0Bh-0Ch starting cluster of file
	  0Dh-0Eh file time in packed format
	  0Fh-10h file date in packed format
	  11h-14h file size
	  15h-18h current offset in file
	  19h-1Ah ???
	  1Bh-1Ch last cluster read
	  1Dh-1Fh ???
	  20h-2Ah filename in FCB format (no path, no period, blank-padded)
	  2Bh-30h unused??? I see 0 always
	  31h-32h PSP segment of file's owner
	  33h-34h unused??? I see 0 always
08h-0Bh Pointer to CLOCK$ device driver, whether installable or resident
0Ch-0Fh Pointer to actual CON: device driver, whether installable or resident
--DOS 2.x
10h	Number of logical drives in system
11h-12h Maximum bytes/block of any block device
13h-16h pointer to first disk buffer
	10h bytes control info followed by the 512-byte buffer
	  00h-03h pointer to next disk buffer, FFFFh if last
	  04h-07h ???
	  08h-09h logical sector number
	  0Ah-0Bh ???
	  0Ch-0Fh pointer to DOS Device Control Block (see function 32h)
17h	Beginning (not a pointer--the real beginning!) of NUL device driver.
	This is the first device on DOS's linked list of device drivers.
--DOS 3.x
10h-11h Maximum bytes/block of any block device
12h-15h Pointer to first disk buffer
	10h bytes control info per disk buffer, followed by 512-byte buffer
	  00h-03h pointer to next disk buffer, FFFFh if last
	  04h	  drive (0=A:)
	  05h	  flags
		bit 7: ???
		bit 6: ???
		bit 5: contents may be overwritten if set (buffer not dirty)
		bit 4: ???
		bit 3: sector in data area
		bit 2: sector in root directory
		bit 1: sector in FAT
		bit 0: ???
	  06h-07h logical sector number
	  08h	  ???
	  09h	  ???
	  0Ah-0Dh pointer to DOS Device Control Block (see function 32h)
	  0Eh-0Fh unused??? (almost always 0)
16h-19h Pointer to array of drive info:
	51h bytes per drive, starting with A: ...
	  00h-3Fh Current path as ASCIZ, starting with 'x:\'
	  40h-43h ??? I see zeros always
	  44h	  ??? I see 40h always
	  45h-48h pointer to DOS Disk Block for this drive
	  49h-4Ah starting cluster of current dir, 0 = root, -1 never accessed
	  4Bh-4Ch ??? I see FFFFh always
	  4Dh-4Eh ??? I see FFFFh always
	  4Fh-50h ??? I see 2 always
1Ah-1Dh Pointer to FCB table (if CONFIG.SYS contains FCBS=)
1Eh-1Fh Size of FCB table
20h	Number of block devices
21h	Value of LASTDRIVE command in CONFIG.SYS (default 5)
22h	Beginning (not a pointer--the real beginning!) of NUL device driver.
	This is the first device on DOS's linked list of device drivers.
	Device driver header format:
	  DWORD pointer to next driver or -1 if last driver
	  WORD	device attributes
		bit 15	character device
		bit 14	IOCTL supported
		bit 13	output until busy
		bit 12	reserved
		bit 11	OPEN/CLOSE/RM calls supported
		bit 10-5 reserved
		bit 4	device is special
		bit 3	device is CLOCK
		bit 2	device is NUL
		bit 1	device is standard output
		bit 0	device is standard input
	  WORD	device strategy entry point
	  WORD	device interrupt entry point
	8 BYTEs blank-padded character device name
	  WORD	0 (CD-ROM driver)
	  BYTE	drive letter (CD-ROM driver)
	  BYTE	number of units (CD-ROM driver)

---
+++Int 21 53

INT 21 - DOS Internal - TRANSLATE BPB
	AH = 53h
	DS:SI points to BPB (Bios Parameter Block)
	ES:BP points to area for DOS Disk Block
Note:	Translates BPB (Bios Parameter Block, see below) into a DOS Disk Block
	(see function 32h).
BPB structure:
	WORD  bytes/sector. Get from DDB bytes 2-3.
	BYTE  sectors/cluster. Get from (DDB byte 4) + 1
	WORD  reserved sectors. Get from DDB bytes 6-7
	BYTE  number of FATs. Get from DDB byte 8
	WORD  number of root dir entries. Get from DDB bytes 09h-0Ah
	WORD  total number of sectors. Get from:
	((DDB bytes D-E) - 1) * (sectors per cluster (BPB byte 2))
	  + (DDB Bytes B-C)
	BYTE  media descriptor byte. Get from DDB byte 16h
	WORD  number of sectors/FAT. Get from DDB byte 0Fh
--DOS 3.x--
	WORD  number of sectors per track
	WORD  number of heads
	DWORD number of hidden sectors
     11 BYTEs reserved	

---
+++Int 21 54

INT 21 - DOS 2+ - GET VERIFY FLAG
	AH = 54h
Return: AL = 0 if flag OFF
	AL = 1 if flag ON

---
+++Int 21 55

INT 21 - DOS Internal - CREATE PSP
	AH = 55h
	DX = segment number at which to set up PSP
Note: Like func 26h but creates "child" PSP rather than copying existing one.

---
+++Int 21 56

INT 21 - DOS 2+ - RENAME A FILE
	AH = 56h
	DS:DX -> ASCIZ old name
	ES:DI -> ASCIZ new name
Return: CF set on error
	    AX = error code
Note: allows move between directories on same logical volume
      (DOS 3.x) allows renaming of directories

---
+++Int 21 57

INT 21 - DOS 2+ - GET/SET FILE'S DATE/TIME
	AH = 57h
	AL = function code
	    00h get date and time
	       Return: CX = time of last write
		       DX = date of last write
	    01h set date and time
	       CX = time to be set
	       DX = date to be set
	BX = file handle
Return: CF set on error
	    AX = error code

---
+++Int 21 58

INT 21 - DOS 3.x - GET/SET MEMORY ALLOCATION STRATEGY
	AH = 58h
	AL = function code
	    0 = get allocation strategy
	    1 = set allocation strategy
	       BL = strategy code
		   0 first fit (use first memory block large enough)
		   1 best fit (use smallest memory block large enough)
		   2 last fit (use high part of last usable memory block)
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = strategy code
Note: the Set subfunction accepts any value in BL; 2 or greater means last fit.
      the Get subfunction returns the last value set, so programs should check
      whether the value is >= 2, not just equal to 2.

---
+++Int 21 59

INT 21 - DOS 3.x - GET EXTENDED ERROR CODE
	AH = 59h
	BX = version code (0000 for DOS 3.x)
Return: AX = extended error code
	BH = class of error
	BL = suggested action code
	CH = locus (where error occurred)
	CL, DX, SI, DI, BP, DS, and ES destroyed

Error codes:
	01h function number invalid
	02h file not found
	03h path not found
	04h too many open files (no handles available)
	05h access denied
	06h invalid handle
	07h memory control block destroyed
	08h insufficient memory
	09h memory block address invalid
	0Ah environment invalid
	0Bh format invalid
	0Ch access code invalid
	0Dh data invalid
	0Fh invalid drive
	10h attempted to remove current directory
	11h not same device
	12h no more files
	13h disk write-protected
	14h unknown unit
	15h drive not ready
	16h unknown command
	17h data error (CRC)
	18h bad request structure length
	19h seek error
	1Ah unknwon media type (non-DOS disk)
	1Bh sector not found
	1Ch printer out of paper
	1Dh write fault
	1Eh read fault
	1Fh general failure
	20h sharing violation
	21h lock violation
	22h disk change invalid
	    ES:DI -> ASCIZ volume label of required disk
	23h FCB unavailable
	24h sharing buffer overflow
	25h-31h reserved
	32h Network request not supported (DOS 3.1 + MS Networks)
	33h Remote computer not listening
	34h Duplicate name on network
	35h Network name not found
	36h Network busy
	37h Network device no longer exists
	38h Network BIOS command limit exceeded
	39h Network adapter hardware error
	3Ah Incorrect response from network
	3Bh Unexpected network error
	3Ch Incompatible remote adapter
	3Dh Print queue full
	3Eh Queue not full
	3Fh Not enough space to print file
	40h Network name was deleted
	41h Network: Access denied
	42h Network device type incorrect
	43h Network name not found
	44h Network name limit exceeded
	45h Network BIOS session limit exceeded
	46h Temporarily paused
	47h Network request not accepted
	48h Print/disk redirection paused (DOS 3.1 + MS Networks)
	49h-4Fh reserved
	50h file exists
	51h reserved
	52h cannot make directory
	53h fail on INT 24h
	54h (DOS 3.3) too many redirections
	55h (DOS 3.3) duplicate redirection
	56h (DOS 3.3) invalid password
	57h (DOS 3.3) invalid parameter
	58h (DOS 3.3) network write fault
Error Classes:
	01h out of resource (storage space or I/O channels)
	02h temporary situation (file or record lock)
	03h authorization (denied access)
	04h internal (system software bug)
	05h hardware failure
	06h system failure (configuration file missing or incorrect)
	07h application program error
	08h not found
	09h bad format
	0Ah locked
	0Bh media error
	0Ch already exists
	0Dh unknown
Suggested Action:
	01h retry
	02h delayed retry
	03h prompt user to reenter input
	04h abort after cleanup
	05h immediate abort
	06h ignore
	07h retry after user intervention
Error Locus:
	01h unknown or not appropriate
	02h block device (disk error)
	03h network related
	04h serial device (timeout)
	05h memory related

---
+++Int 21 5A

INT 21 - DOS 3.x - CREATE UNIQUE FILE
	AH = 5Ah
	DS:DX -> ASCIZ directory path name ending with a '\' + 13 bytes to
		 receive generated filename
	CX = file attribute
Return: CF set on error
	    AX = error code
	CF clear if successful
	    AX = file handle
	DS:DX -> path name
Note: The file created is not truly "temporary".  It MUST be removed by the
      user.

---
+++Int 21 5B

INT 21 - DOS 3.x - CREATE NEW FILE
	AH = 5Bh
	DS:DX -> ASCIZ directory path name
	CX = file attribute
Return: CF set on error
	    AX = error code
	CF clear if successful
	DS:DX -> path name
Note: Unlike function 3Ch, function 5Bh will fail if the file already exists.

---
+++Int 21 5C

INT 21 - DOS 3.x - LOCK/UNLOCK FILE ACCESS
	AH = 5Ch
	AL = 0 if lock
	     1 if unlock
	BX = file handle
	CX:DX = starting offset of region to lock
	SI:DI = size of region to lock
Return: CF set on error
	    AX = error code

---
+++Int 21 5D

INT 21 - DOS 3.x Internal - GET ADDRESS OF CRITICAL ERROR FLAG
	AX = 5D06h
Return: DS:SI -> critical error flag
	CX = ???
	DX = ???
Notes:	this call also does a lot of other work in addition to returning the
	pointer
	setting CritErr flag allows use of functions 50h/51h from INT 28h under
	DOS 2.x by forcing use of correct stack
─────────────────────────────────────────────────-
INT 21 - DOS 3.x Internal - ???
	AH = 5Dh
	AL = subfunction
	     07h: ???
	     08h: (used by COMMAND.COM)
	     09h: (used by COMMAND.COM)
─────────────────────────────────────────────────-
INT 21 - DOS 3.1+ internal - SET EXTENDED ERROR INFORMATION
	AX = 5D0Ah
	DS:DX = address of 11-word error information
	       words 0 to 7: values of AX,BX,CX,DX,SI,DI,DS,ES that func 59h
			     will return
	       words 8 to 10: zero (reserved)

---
+++Int 21 5E 00

INT 21 - DOS 3.1 + Microsoft Networks - GET MACHINE NAME
	AX = 5E00h
	DS:DX -> buffer for ASCIZ name (16 bytes)
Return: CF set on error
	    AX = error code
	CH = 0 if name not defined
	CL = NETBIOS name number
	DS:DX -> ASCIZ machine name if CH <> 0

---
+++Int 21 5E 01

INT 21 - DOS 3.1 + Microsoft Networks - SET MACHINE NAME
	AX = 5E01h
	DS:DX -> ASCIZ name
	CL = name number
	CH = ???

---
+++Int 21 5E 02

INT 21 - DOS 3.1 + Microsoft Networks - SET PRINTER SETUP
	AX = 5E02h
	BX = Redirection list index
	CX = length of setup string (<= 64)
	DS:SI -> string buffer
Return: CF set on error
	    AX = error code

---
+++Int 21 5E 03

INT 21 - DOS 3.1 + Microsoft Networks - GET PRINTER SETUP
	AX = 5E03h
	BX = Redirection list index
	ES:DI -> string buffer
Return: CF set on error
	    AX = error code
	CX = length of setup string (<= 64)

---
+++Int 21 5F 02

INT 21 - DOS 3.1 + Microsoft Networks - GET REDIRECTION LIST ENTRY
	AX = 5F02h
	BX = Redirection list index
	DS:SI -> 16 char local device name buffer
	ES:DI -> 128 char network name buffer
Return: CF set on error
	    AX = error code
	BH = Device status flag (BIT 0 = 0 if valid)
	BL = device type (03 if printer, 04 if drive)
	CX = stored parameter value (user data)
Note: DX and BP are destroyed by this call!

---
+++Int 21 5F 03

INT 21 - DOS 3.1 + Microsoft Networks - REDIRECT DEVICE
	AX = 5F03h
	BL = device type
		03 = printer device
		04 = file device
	CX = stored parameter value
	DS:SI -> ASCIZ source device name
	ES:DI -> destination ASCIZ network path + ASCIZ password
Return: CF set on error
	    AX = error code

---
+++Int 21 5F 04

INT 21 - DOS 3.1 + Microsoft Networks - CANCEL REDIRECTION
	AX = 5F04h
	DS:SI -> ASCIZ device name or network path
Return: CF set on error
	    AX = error code

---
+++Int 21 60

INT 21 - DOS 3.x Internal - RESOLVE PATH STRING TO FULLY QUALIFIED PATH STRING
	AH = 60h
	DS:SI = relative path string
	ES:DI = buffer for fully qualified name
Return: buffer filled with qualified name; may return error code, unknown.

---
+++Int 21 61

INT 21 - DOS 3.x Internal - UNUSED
	AH = 61h
Return: AL = 0

---
+++Int 21 62

INT 21 - DOS 3.x - GET PSP ADDRESS
	AH = 62h
Return: BX = segment address of PSP

---
+++Int 21 63

INT 21 - DOS 2.25 only - GET LEAD BYTE TABLE
	AH = 63h
	AL = subfunction
	     0 = get system lead byte table
	     1 = set/clear interim console flag
		DL = 1/0 to set/clear interim console flag
	     2 = get interim console flag
Return: CF set on error
	    AX = error code
	DS:SI -> lead byte table (AL = 0)
	DL = interim console flag (AL = 2)
Note: does not preserve any registers other than SS:SP

---
+++Int 21 64

INT 21 - DOS 3.2 Internal - ???
	AH = 64h
	AL = subfunction
	    00h get ???
		Return: DL = ???
	    01h set ???
		DL = ???
	    02h get and set ???
		DL = new ???
		Return: DL = old ???

---
+++Int 21 65

INT 21 - DOS 3.3 - GET EXTENDED COUNTRY INFORMATION
	AH = 65h
	AL = info ID
	    01h get general internationalization info
	    02h get pointer to uppercase table
	    04h get pointer to filename uppercase table
	    06h get poiner to collating sequence table
	BX = code page (-1=global code page)
	DX = country ID (-1=current country)
	ES:DI -> country information buffer
	CX = size of buffer (>= 5)
Return: CF set on error
	    AX = error code
	CF clear if succesful
	    CX = size of country information returned
	    ES:DI -> country information:
		BYTE  info ID
		if info ID == 1
		    WORD  size
		    WORD  country ID
		    WORD  code page
		 34 BYTEs see function 38h
		if info ID == 2
		    DWORD pointer to uppercase table
			  WORD	table size
		      128 BYTEs uppercase equivalents (if any) of chars 80h-FFh
		if info ID == 4
		    DWORD pointer to collating table
		  	  WORD	table size
		      256 BYTEs values used to sort characters 00h-FFh
		if info ID == 6
		    DWORD pointer to filename uppercase table
			  WORD	table size
		      128 BYTEs uppercase equivalents (if any) of chars 80h-FFh

---
+++Int 21 66

INT 21 - DOS 3.3 - GET/SET GLOBAL CODE PAGE TABLE
	AH = 66h
	AL = 01h get global code page
	     Return: AX = error code if carry flag set
		     BX = active code page
		     DX = system code page
	   = 02h set global page
	     BX = active code page
		 437  US
		 850  Multilingual
		 860  Portugal
		 863  Canada (French)
		 865  Norway/Denmark
	     DX = system code page (active page at boot time)
	     Return: AX = error code if carry flag set

---
+++Int 21 67

INT 21 - DOS 3.3 - SET HANDLE COUNT
	AH = 67h
	BX = desired number of handles (max 255)
Return: Carry set if error (and error code in AX)

---
+++Int 21 68

INT 21 - DOS 3.3 - COMMIT FILE, WRITE ALL BUFFERED DATA TO DISK
	AH = 68h
	BX = file handle
Return: carry flag set on error (and error code in AX)
Note: if BX <= 20, no action is taken

---
+++Int 21 6C

INT 21 - DOS 4.0 - EXTENDED OPEN/CREATE
	AX = 6C00h
	BL = open mode as in AL for normal open
	BH = 0WF00000
	    W = auto commit on write
	    F = return error rather than doing INT 24h
	CX = create attribute
	DL = action if file exists/does not exists
	    bits 7-4 action if file does not exist
		    0000 fail
		    0001 create
	    bits 3-0 action if file exists
		    0000 fail
		    0001 open
		    0010 replace/open
	DH = 0
	DS:SI -> ASCIZ file name
Return: CF set on error
	   AX = error code
	CF clear if successful
	   AX = file handle
	   CX = 1 file opened
		2 file created
		3 file replaced

---
+++Int 21 B6

INT 21 - Novell NetWare SFT Level II - EXTENDED FILE ATTRIBUTES
	AH = B6h
	AL = subfunction
	    00h get extended file attributes
	    01h set extended file attributes
	CL = attributes
	    bit 4: transaction tracking file
		5: indexing file (to be implemented)
	        6: read audit (to be implemented)
	        7: write audit (to be implemented)
	DS:DX -> ASCIZ pathname
Return: CF set on error
	    AL = error code
		FFh file not found
		8Ch caller lacks privileges
	CL = current extended file attributes

---
+++Int 21 B8

INT 21 - Novell Advanced NetWare 2.0+ - PRINT JOBS
	AH = B8h
	AL = subfunction
	    00h get default print job flags
	    01h set default capture flags
	    02h get specific capture flags
	    03h set specific print job flags
	    04h get default local printer
	    05h set default local printer
	    06h set capture print queue
	    07h set capture print job
	    08h get banner user name
	    09h set banner user name
	CX = buffer size
	ES:BX -> buffer
Return: none

---
+++Int 21 BB

INT 21 - Novell NetWare 4.0 - SET END OF JOB STATUS
	AH = BBh
	AL = new EOJ flag
	    00h disable EOJs
	    otherwise enable EOJs
Return: AL = old EOJ flag

---
+++Int 21 BC

INT 21 - Novell NetWare 4.6 - LOG PHYSICAL RECORD
	AH = BCh
	AL = flags
	    bit 0: lock as well as log record
	        1: non-exclusive lock
	BX = file handle
	CX:DX = offset
	BP = timeout in timer ticks (1/18 sec)
	SI:DI = length
Return: AL = error code

---
+++Int 21 BD

INT 21 - Novell NetWare 4.6 - RELEASE PHYSICAL RECORD
	AH = BDh
	BX = file handle
	CX:DX = offset
Return: AL = error code

---
+++Int 21 BE

INT 21 - Novell NetWare 4.6 - CLEAR PHYSICAL RECORD
	AH = BEh
	BX = file handle
	CX:DX = offset
Return: AL = error code

---
+++Int 21 BF

INT 21 - Novell NetWare 4.6 - LOG RECORD (FCB)
	AH = BFh
	AL = flags
	    bit 0: lock as well as log record
	        1: non-exclusive lock
	DS:DX -> FCB
	BX:CX = offset
	BP = timeout in timer ticks (1/18 sec)
	SI:DI = length
Return: AL = error code

---
+++Int 21 C0

INT 21 - Novell NetWare 4.6 - RELEASE RECORD (FCB)
	AH = C0h
	DS:DX -> FCB
	BX:CX = offset
Return: AL = error code

---
+++Int 21 C1

INT 21 - Novell NetWare 4.6 - CLEAR RECORD (FCB)
	AH = C1h
	DS:DX -> FCB
	BX:CX = offset
Return: AL = error code

---
+++Int 21 C2

INT 21 - Novell NetWare 4.6 - LOCK PHYSICAL RECORD SET
	AH = C2h
	AL = flags
	    bit 1: non-exclusive lock
	BP = timeout in timer ticks (1/18 sec)
Return: AL = error code

---
+++Int 21 C3

INT 21 - Novell NetWare 4.6 - RELEASE PHYSICAL RECORD SET
	AH = C3h
Return: AL = error code

---
+++Int 21 C4

INT 21 - Novell NetWare 4.6 - CLEAR PHYSICAL RECORD SET
	AH = C4h
Return: AL = error code

---
+++Int 21 C5

INT 21 - Novell NetWare 4.6 - SEMAPHORES
	AH = C5h
	AL = subfunction
	    00h open semaphore
		DS:DX -> semaphore name
		CL = initial value
	    01h examine semaphore
		Return: CX = semaphore value (sign extended)
			DL = open count
	    02h wait on semaphore
		BP = timeout in timer ticks (1/18 sec)
	    03h signal semaphore
	    04h close semaphore
	CX:DX = semaphore handle (except function 00h)
Return: AL = error code
	if function 00h
	   CX:DX = semaphore handle
	   BL = open count

---
+++Int 21 C6

INT 21 - Novell NetWare 4.6 - GET OR SET LOCK MODE
	AH = C6h
	AL = subfunction
	    00h set old "compatibility" mode
	    01h set new extended locks mode
	    02h get lock mode
Return: AL = current lock mode

---
+++Int 21 C7

INT 21 - Novell NetWare 4.0 - TTS
	AH = C7h
	AL = subfunction
	    00h begin transaction (NetWare SFT level II)
		Return: AL = error code
	    01h end transaction (NetWare SFT level II)
		Return: AL = error code
			CX:DX = transaction reference number
	    02h TTS available (NetWare SFT level II)
		Return: AL = completion code
			    00h TTS not available
			    01h TTS available
			    FDh TTS available but disabled
	    03h abort transaction (NetWare SFT level II)
		Return: AL = error code
	    04h transaction status
	    05h get application thresholds
	    06h set application thresholds
	    07h get workstation thresholds
	    08h set workstation thresholds
Return: ???

---
+++Int 21 C8

INT 21 - Novell NetWare 4.0 - BEGIN LOGICAL FILE LOCKING
	AH = C8h
	if function C6h lock mode 00h:
	    DL = mode
		00h no wait
		01h wait
	if function C6h lock mode 01h:
	    BP = timeout in timer ticks (1/18 sec)
Return: AL = error code

---
+++Int 21 C9

INT 21 - Novell NetWare 4.0 - END LOGICAL FILE LOCKING
	AH = C9h
Return: AL = error code

---
+++Int 21 CA

INT 21 - Novell NetWare 4.0 - LOG PERSONAL FILE (FCB)
	AH = CAh
	DS:DX -> FCB
	if function C6h lock mode 01h:
	    AL = log and lock flag
		00h log file only
		01h lock as well as log file
	    BP = timeout in timer ticks (1/18 sec)
Return: AL = error code

---
+++Int 21 CB

INT 21 - Novell NetWare 4.0 - LOCK FILE SET
	AH = CBh
	if function C6h lock mode 00h:
	    DL = mode
		00h no wait
		01h wait
	if function C6h lock mode 01h:
	    BP = timeout in timer ticks (1/18 sec)
Return: AL = error code

---
+++Int 21 CC

INT 21 - Novell NetWare 4.0 - RELEASE FILE (FCB)
	AH = CCh
	DS:DX -> FCB
Return: none

---
+++Int 21 CD

INT 21 - Novell NetWare 4.0 - RELEASE FILE SET
	AH = CDh
Return: none

---
+++Int 21 CE

INT 21 - Novell NetWare 4.0 - CLEAR FILE (FCB)
	AH = CEh
	DS:DX -> FCB
Return: AL = error code

---
+++Int 21 CF

INT 21 - Novell NetWare 4.0 - CLEAR FILE SET
	AH = CFh
Return: AL = 00h

---
+++Int 21 D0

INT 21 - Novell NetWare 4.6 - LOG LOGICAL RECORD
	AH = D0h
	DS:DX -> record string
	if function C6h lock mode 01h:
	    AL = flags
		bit 0: lock as well as log the record
		bit 1: non-exclusive lock
	    BP = timeout in timer ticks (1/18 sec)
Return: AL = error code

---
+++Int 21 D1

INT 21 - Novell NetWare 4.6 - LOCK LOGICAL RECORD SET
	AH = D1h
	if function C6h lock mode 00h:
	    DL = mode
		00h no wait
		01h wait
	if function C6h lock mode 01h:
	   BP = timeout in timer ticks (1/18 sec)
Return: AL = error code

---
+++Int 21 D2

INT 21 - Novell NetWare 4.0 - RELEASE LOGICAL RECORD
	AH = D2h
	DS:DX -> record string
Return: AL = error code

---
+++Int 21 D3

INT 21 - Novell NetWare 4.0 - RELEASE LOGICAL RECORD SET
	AH = D3h
Return: AL = error code

---
+++Int 21 D4

INT 21 - Novell NetWare 4.0 - CLEAR LOGICAL RECORD
	AH = D4h
	DS:DX -> record string
Return: AL = error code

---
+++Int 21 D5

INT 21 - Novell NetWare 4.0 - CLEAR LOGICAL RECORD SET
	AH = D5h
Return: AL = error code

---
+++Int 21 D6

INT 21 - Novell NetWare 4.0 - END OF JOB
	AH = D6h
Return: AL = error code

---
+++Int 21 D7

INT 21 - Novell NetWare 4.0 - SYSTEM LOGOUT
	AH = D7h
Return: AL = error code

---
+++Int 21 DA

INT 21 - Novell NetWare 4.0 - GET VOLUME STATISTICS
	AH = DAh
	DL = volume number
	ES:DI -> reply buffer
Return: AL = 00h
	    reply buffer
		WORD  sectors/block
		WORD  total blocks
		WORD  unused blocks
		WORD  total directory entries
		WORD  unused directory entries
	     16 BYTEs volume name, null padded
		WORD  removable flag, 0 = not removable

---
+++Int 21 DB

INT 21 - Novell NetWare 4.0 - GET NUMBER OF LOCAL DRIVES
	AH = DBh
Return: AL = number of local disks

---
+++Int 21 DC

INT 21 - Novell NetWare 4.0 - GET STATION NUMBER
	AH = DCh
Return: AL = station number
	    0 if NetWare not loaded or this machine is a non-dedicated server
	CX = station number in ASCII

---
+++Int 21 DD

INT 21 - Novell NetWare 4.0 - SET ERROR MODE
	AH = DDh
	DL = error mode
	    00h display critical I/O errors
	    01h extended errors for all I/O in AL
	    02h extended errors for critical I/O in AL
Return: AL = previous error mode

---
+++Int 21 DE

INT 21 - Novell NetWare 4.0 - SET BROADCAST MODE
	AH = DEh
	AL = broadcast mode
	    00h receive console and workstation broadcasts
	    01h receive console broadcasts only
	    02h receive no broadcasts
	    03h store all broadcasts for retrieval
	    04h get broadcast mode
	    05h disable shell tiemr interrupt checks
	    06h enable shell timer interrupt checks
Return: AL = old broadcast mode

---
+++Int 21 DF

INT 21 - Novell NetWare 4.0 - CAPTURE
	AH = DFh
	AL = subfunction
	    00h start LPT capture
	    01h end LPT capture
	    02h cancel LPT capture
	    03h flush LPT capture
	    04h start specific capture
	    05h end specific capture
	    06h cancel specific capture
	    07h flush specific capture
Return: AL = error code

---
+++Int 21 E0

INT 21 - Novell NetWare 4.0 - PRINT SPOOLING
	AH = E0h
	DS:SI -> request buffer
	ES:DI -> reply buffer
	subfunction in third byte of request buffer
	    00h spool data to a capture file
	    01h close and queue capture file
	    02h set spool flags
	    03h spool existing file
	    04h get spool queue entry
	    05h remove entry from spool queue
	    06h get printer status
	    09h create a disk capture file
Return: AL = error code

---
+++Int 21 E1

INT 21 - Novell NetWare 4.0 - BROADCAST MESSAGES
	AH = E1h
	DS:SI -> request buffer
	ES:DI -> reply buffer
	subfunction in third byte of request buffer
	    00h send broadcast message
	    01h get broadcase message
	    02h disable station broadcasts
	    03h enable station broadcasts
	    04h send personal message
	    05h get personal message
	    06h open message pipe
	    07h close message pipe
	    08h check pipe status
	    09h broadcast to console
Return: AL = error code

---
+++Int 21 E2

INT 21 - Novell NetWare 4.0 - DIRECTORY FUNCTIONS
	AH = E2h
	DS:SI -> request buffer
	ES:DI -> reply buffer
	subfunction in third byte of request buffer
	    00h set directory handle
	    01h get directory path
	    02h scan directory information
	    03h get effective directory rights
	    04h modify maximum rights mask
	    05h get volume number
	    06h get volume name
	    0Ah create directory
	    0Bh delete directory
	    0Ch scan directory for trustees
	    0Dh add trustee to directory
	    0Eh delete trustee from directory
	    0Fh rename directory
	    10h purge erased files
	    11h restore erased file
	    12h allocate permanent directory handle
	    13h allocate temporary directory handle
	    14h deallocate directory handle
	    15h get volume info with handle
	    16h allocate special temporary directory handle
	    17h retrieve a short base handle (Advanced NetWare 2.0)
	    18h restore a short base handle (Advanced NetWare 2.0)
	    19h set directory information
Return: AL = error code

---
+++Int 21 E3

INT 21 - Novell NetWare 4.0 - CONNECTION CONTROL
	AH = E3h
	DS:SI -> requst buffer
	ES:DI -> reply buffer
	subfunction in third byte of request buffer
	    00h login
	    01h change password
	    02h map user to station set
	    03h map object to number
	    04h map number to object
	    05h get station's logged information
	    06h get station's root mask (obsolete)
	    07h map group name to number
	    08h map number to group name
	    09h get memberset M of group G
	    0Ah enter login area
	    0Bh
	    0Ch
	    0Dh log network message
	    0Eh get disk utilization (Advanced NetWare 1.0)
	    0Fh scan file information (Advanced NetWare 1.0)
	    10h set file information (Advanced NetWare 1.0)
	    11h get file server information (Advanced NetWare 1.0)
	    12h
	    13h get internet address (Advanced NetWare 1.02)
	    14h login to file server (Advanced NetWare 2.0)
	    15h get object connection numbers (Advanced NetWare 2.0)
	    16h get connection information (Advanced NetWare 1.0)
	    32h create object (Advanced NetWare 1.0)
	    33h delete object (Advanced NetWare 1.0)
	    34h rename object (Advanced NetWare 1.0)
	    35h get object ID (Advanced NetWare 1.0)
	    36h get object name (Advanced NetWare 1.0)
	    37h scan object (Advanced NetWare 1.0)
	    38h change object security (Advanced NetWare 1.0)
	    39h create propery (Advanced NetWare 1.0)
	    3Ah delete property (Advanced NetWare 1.0)
	    3Bh change property security (Advanced NetWare 1.0)
	    3Ch scan property (Advanced NetWare 1.0)
	    3Dh read property value (Advanced NetWare 1.0)
	    3Eh write property value (Advanced NetWare 1.0)
	    3Fh verify object password (Advanced NetWare 1.0)
	    40h change object password (Advanced NetWare 1.0)
	    41h add object to set (Advanced NetWare 1.0)
	    42h delete object from set (Advanced NetWare 1.0)
	    43h is object in set? (Advanced NetWare 1.0)
	    44h close bindery (Advanced NetWare 1.0)
	    45h open bindery (Advanced NetWare 1.0)
	    46h get bindery access level (Advanced NetWare 1.0)
	    47h scan object trustee paths (Advanced NetWare 1.0)
	    C8h check console priviledges
	    C9h get file server description strings
	    CAh set file server date and time
	    CBh disable file server login
	    CCh enable file server login
	    CDh get file server login status
	    CEh purge all erased files
	    CFh disable transaction tracking
	    D0h enable transaction tracking
	    D1h send console broadcast
	    D2h clear connection number
	    D3h down file server
	    D4h get file system statistics
	    D5h get transaction tracking statistics
	    D6h read disk cache statistics
	    D7h get drive mapping table
	    D8h read physical disk statistics
	    D9h get disk channel statistics
	    DAh get connection's task information
	    DBh get list of connection's open files
	    DCh get list of connections using a file
	    DDh get physical record locks by connection and file
	    DEh get physical record locks by file
	    DFh get logical records by connection
	    E0h get logical record information
	    E1h get connection's semaphores
	    E2h get semaphore information
	    E3h get LAN driver's configuration information
	    E5h get connection's usage statistics
	    E6h get object's remaining disk space
	    E7h get server LAN I/O statistics
	    E8h get server miscellaneous information
	    E9h get volume information
Return: AL = error code

---
+++Int 21 E4

INT 21 - Novell NetWare 4.0 - SET FILE ATTRIBUTES (FCB)
	AH = E4h
	CL = file attributes
	    bit 0: read only
		1: hidden
		2: system
		7: shareable
	DX:DX -> FCB
Return: AL = error code
─────────────────────────────────────────────────-
INT 21 - DoubleDos - INSTALLATION CHECK
	AX = E400h
Return: AL <> 0 if DoubleDos is active

---
+++Int 21 E5

INT 21 - Novell NetWare 4.0 - UPDATE FILE SIZE (FCB)
	AH = E5h
	DS:DX -> FCB
Return: AL = error code

---
+++Int 21 E6

INT 21 - Novell NetWare 4.0 - COPY FILE TO FILE (FCB)
	AH = E6h
	CX:DX = number of bytes to copy
	DS:SI -> source FCB
	ES:DI -> destination FCB
Return: AL = error code

---
+++Int 21 E7

INT 21 - Novell NetWare 4.0 - GET FILE SERVER DATE AND TIME
	AH = E7h
	DS:DX -> reply buffer
		BYTE  year - 1900
		BYTE  month
		BYTE  day
		BYTE  hours
		BYTE  minutes
		BYTE  seconds
		BYTE  day of week (0 = Sunday)
Return: AL = error code

---
+++Int 21 E8

INT 21 - Novell NetWare 4.6 - SET FCB RE-OPEN MODE
	AH = E8h
	DL = mode
	    00h no automatic re-open
	    01h auto re-open
Return: AL = error code

---
+++Int 21 E9

INT 21 - Novell NetWare 4.6 - SHELL'S "GET BASE STATUS"
	AH = E9h
	AL = subfunction
	    00h get directory handle
	DX = drive number to check (0 = A:)
Return: AL = network pathbase
	AH = base flags
	    00h drive not currently mapped to a base
	    01h drive is mapped to a permanent base
	    02h drive is mapped to a temporary base
	    03h drive exists locally

---
+++Int 21 EA

INT 21 - Novell NetWare 4.6 - RETURN SHELL VERSION
	AH = EAh
	AL = subfunction
	    00h return code in AL
		Return: AL = hardware type
			    00h IBM PC
			    01h Victor 9000
	    01h get workstation environment string
		ES:DI -> 40-byte buffer
		Return: buffer filled with three null-terminated entries:
			major operating system
			version
			hardware type
Return: AH = 0 if DOS
─────────────────────────────────────────────────-
INT 21 - DoubleDos - TURN OFF TASK SWITCHING
	AH = EAh
Return: task switching turned off

---
+++Int 21 EB

INT 21 - Novell NetWare 4.6 - LOG FILE
	AH = EBh
	DS:DX -> ASCIZ filename
	if function C6h lock mode 01h:
	    AL = flags
		00h log file only
		01h lock as well as log file
	    BP = timeout in timer ticks (1/18 second)
Return: AL = error code
─────────────────────────────────────────────────-
INT 21 - DoubleDos - TURN ON TASK SWITCHING
	AH = EBh
Return: task switching turned on

---
+++Int 21 EC

INT 21 - Novell NetWare 4.6 - RELEASE FILE
	AH = ECh
	DS:DX -> ASCIZ filename
Return: none
─────────────────────────────────────────────────-
INT 21 - DoubleDos - GET VIRTUAL SCREEN ADDRESS
	AH = ECh
Return: ES = segment of virtual screen
Note: Screen address can change if task-switching is on!!

---
+++Int 21 ED

INT 21 - Novell NetWare - CLEAR FILE
	AH = EDh
	DS:DX -> ASCIZ filename
Return: AL = error code

---
+++Int 21 EE

INT 21 - Novell NetWare 4.6 - GET PHYSICAL STATION NUMBER
	AH = EEh
Return: CX:BX:AX = six-byte address
─────────────────────────────────────────────────-
INT 21 - DoubleDos - GIVE AWAY TIME TO OTHER TASKS
	AH = EEh
	AL = number of 55ms time slices to give away
Return: returns after giving away time slices

---
+++Int 21 EF

INT 21 - Novell Advanced NetWare 1.0+ - GET DRIVE INFO
	AH = EFh
	AL = subfunction
	    00h get drive handle table
	    01h get drive flag table
	    02h get drive connection ID table
	    03h get connection ID table
	    04h get file server name table
Return: ES:DI -> shell status table

---
+++Int 21 F0

INT 21 - Novell Advanced NetWare 1.0+ - CONNECTION ID
	AH = F0h
	AL = subfunction
	    00h set preferred connection ID
	    01h get preferred connection ID
	    02h get default connection ID
	    03h LPT capture active
	    04h set primary connection ID
	    05h get primary connection ID
	DL = preferred file server
Return: AL = selected file server

---
+++Int 21 F1

INT 21 - Novell Advanced NetWare 1.0+ - FILE SERVER CONNECTION
	AH = F1h
	AL = subfunction
	    00h attach to file server
		DL = preferred file server
	    01h detach from file server
	    02h logout from file server
Return: AL = completion code

---
+++Int 21 F2

INT 21 - Novell NetWare - ???
	AH = F2h
	???
Return: ???

---
+++Int 21 F3

INT 21 - Novell Advanced NetWare 2.0+ - FILE SERVER FILE COPY
	AH = F3h
	ES:DI -> request string
		WORD  source file handle
		WORD  destination file handle
	        DWORD starting offset in source
		DWORD starting offset in destination
		DWORD number of bytes to copy
Return: AL = status/error code
	CX:DX = number of bytes copied

---
+++Int 21 FF

INT 21 - CED - INSTALLABLE COMMANDS
	AH = FFh
	   AL = 0 add installable command
	     BL = mode - bit 0 = 1 callable from DOS prompt
			 bit 1 = 1 callable from application
	     DS:SI -> CR-terminated command name
	     ES:DI -> FAR routine entry point
	   AL = 1 remove installable command
	     DS:SI -> CR-terminated command name
	   AL = 2 reserved, may be used to test for CED installation
Return: CF set on error
	    AX = 01h invalid function
		 02h command not found (subfunction 1 only)
		 08h insufficient memory (subfunction 0 only)
		 0Eh bad data (subfunction 0 only)
	AH = 0FFh if CED not installed

---
